package com.beasts.antpage.sh.controller;

import com.beasts.antpage.core.utils.StringUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

/**
 * 转发页面入口
 * @author cn_zkn
 * @date 07/05/2018 8:39 AM
 * @since 1.0
 */
@Controller
public class RedirectController {
    /**
     * 获取指定布局管理 器
     *
     * @param type 请求参数，指定管理器类型，默认 react，可选 bootstrap
     * @return
     */
//    @ApiOperation(value = "布局管理器配置页", notes = "实现自定义布局")
//    @ApiImplicitParam(name = "type", value = "布局管理器类型，默认 react，可选 bootstrap", dataType = "String")
    @GetMapping("layoutmanager")
    public String layoutManagerIndex(@RequestParam(value = "type", required = false, defaultValue = "Bootstrap") String type, HttpServletRequest req) {
        return "subpage/layout/layoutManager" + StringUtil.toUpperCaseFirstOne(type);
    }
    /**
     * 频道编辑页
     * @return
     */
    @RequestMapping({"/editPortlet"})
    public String editPortlet() {
        return "subpage/layout/editPortlet";
    }

    /**
     * 待办页
     * @return
     */
    @RequestMapping({"/todoWorkList"})
    public String todoWorkList() {
        return "subpage/todoWork/todoWorkList";
    }
    /**
     * 消息页
     * @return
     */
    @RequestMapping({"/messageList"})
    public String messageList() {
        return "subpage/message/messageList";
    }

    /**
     * 文章页
     * @return
     */
    @RequestMapping({"/articleList"})
    public String articleList() {
        return "subpage/article/articleList";
    }

    /**
     * 文章详细
     * @return
     */
    @RequestMapping({"/articleDetail"})
    public String articleDetail(HttpServletRequest req) {
        return "subpage/article/articleDetail";
    }

    /**
     * 预警消息详细
     * @return
     */
    @RequestMapping({"/messageDetail"})
    public String messageDetail(HttpServletRequest req) {
        return "subpage/message/messageDetail";
    }

    /**
     * 常用操作
     * @return
     */
    @RequestMapping({"/commonOper"})
    public String commonOper(HttpServletRequest req) {
        return "subpage/commonOper/commonOper";
    }
    /**
     * applet嵌入页面
     * @return
     */
    @RequestMapping({"/applet"})
    public String applet(HttpServletRequest req) {
        return "subpage/applet/embApplet";
    }

    /**
     * 一键搜索页面
     * @return
     */
    @RequestMapping({"/keySearch"})
    public String keySearch(HttpServletRequest req) {
        return "subpage/keySearch/keySearch";
    }

    /**
     * 页面配置页面
     * @return
     */
    @RequestMapping({"/pageEdit"})
    public String pageEdit(HttpServletRequest req) {
        return "subpage/pageEdit/pageEdit";
    }

    /**
     * 修改密码页面
     * @return
     */
    @RequestMapping({"/changePw"})
    public String changePw(HttpServletRequest req) {
        return "changePw";
    }

}
